import request from "@/utils/request";

const api_name = '/subject'

export default {
    // 获取课程分类数据
    getList() {
        return request({
            url: `${api_name}`,
            method: 'get'
        })
    },
    // 添加课程分类
    addSubject(subject) {
        return request({
            url: `${api_name}`,
            method: 'post',
            data: subject
        })
    },
    // 根据id删除课程分类
    delListById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'delete'
        })
    }
}